home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 1161 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. From: Roman Lechtchinsky <wolfro@cs.tu-berlin.de>
  2. Message-ID: <31763F3F.805@cs.tu-berlin.de>
  3. X-Original-Date: Thu, 18 Apr 1996 15:10:23 +0200
  4. Path: in1.uu.net!bounce-back
  5. Date: 19 Apr 96 00:25:29 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Newsgroups: comp.std.c++
  8. Subject: Member templates
  9. Organization: Technical University of Berlin
  10. X-Mailer: Mozilla 2.0 (Win95; I)
  11. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  12.     iQBFAgUBMXbdguEDnX0m9pzZAQFM8AF9H/CUu65ArVu6FInGPnLBIWihU8OqiXrX
  13.     WVdq1FTtwdMiD7WHMFg64Bny8BERngEw
  14.     =JqXC
  15.  
  16. Hi, 
  17.  
  18. the question is about member templates and virtual functions. I know these 
  19. are prohibited. However, what about the following example:
  20.  
  21. class Base
  22. {
  23.  virtual void f(int);
  24. };
  25.  
  26. class Derived : Base
  27. {
  28. template<class T> void f(T);
  29. };
  30.  
  31. Is this legal? If so, will the template function f(int) override 
  32. Base::f(int)? If so, when will it be instantiated? And, last but not least, 
  33. which section of the DWP handles this case? Thanks in advance.
  34.  
  35. Bye
  36.  
  37. Roman
  38. ---
  39. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  40. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  41. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  42. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  43. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  44.